#ifndef ENROLL_H
#define ENROLL_H

#include "connection.h"
#include <QWidget>
#include <QSqlDatabase>
#include <QMessageBox>
#include <QDebug>
#include <QSqlError>
#include <QSqlQuery>
#include <QCryptographicHash>

struct userInfo
{
    int id;
    QString password;
};

namespace Ui {
class Enroll;
}

class Enroll : public QWidget
{
    Q_OBJECT


public:
    explicit Enroll(QWidget *parent = nullptr);
    ~Enroll();

private slots:
    void on_btn_return_clicked();
    //注册账号，用户名（ID）为唯一标志
    void on_btn_ok_clicked();

private:
    //插入账号
    bool isInsert(userInfo user);

    Ui::Enroll *ui;
};

#endif // ENROLL_H
